package com.oa;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import springfox.documentation.oas.annotations.EnableOpenApi;

@SpringBootApplication
@EnableEurekaClient
// swagger3.0 需加入此注解
@EnableWebMvc
@EnableOpenApi
/**
 * EnableResourceServer注解开启资源服务，因为程序需要对外暴露获取token的API和验证token的API所以该程序也是一个资源服务器
 */
@EnableResourceServer
public class BOauthApplication {

    private final static Logger logger = LoggerFactory.getLogger(BOauthApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(BOauthApplication.class, args);
        logger.info("=============================================================================");
        logger.info("============================权限控制/登陆模块启动成功============================");
        logger.info("=============================================================================");
    }

}
